<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<style>
			.area {
				margin: 20px auto 0px auto;
			}

			.mui-input-group {
				margin-top: 10px;
			}

			.mui-input-group:first-child {
				margin-top: 20px;
			}

			.mui-input-group label {
				width: 22%;
			}

			.mui-input-row label~input,
			.mui-input-row label~select,
			.mui-input-row label~textarea {
				width: 78%;
			}

			.mui-checkbox input[type=checkbox],
			.mui-radio input[type=radio] {
				top: 6px;
			}

			.mui-content-padded {
				margin-top: 25px;
			}

			.mui-btn {
				padding: 10px;
			}

			.link-area {
				display: block;
				margin-top: 25px;
				text-align: center;
			}

			.spliter {
				color: #bbb;
				padding: 0px 8px;
			}

			.oauth-area {
				position: absolute;
				bottom: 20px;
				left: 0px;
				text-align: center;
				width: 100%;
				padding: 0px;
				margin: 0px;
			}

			.oauth-area .oauth-btn {
				display: inline-block;
				width: 50px;
				height: 50px;
				background-size: 30px 30px;
				background-position: center center;
				background-repeat: no-repeat;
				margin: 0px 20px;
				/*-webkit-filter: grayscale(100%); */
				border: solid 1px #ddd;
				border-radius: 25px;
			}

			.oauth-area .oauth-btn:active {
				border: solid 1px #aaa;
			}

			.oauth-area .oauth-btn.disabled {
				background-color: #ddd;
			}

			.aedqw {
				background-color: #007aff;
			}

			.sferq {
				color: white;
			}

			.asdqwe {
				position: fixed;
				bottom: 10px;
			}

			.aweq {
				color: white;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav aedqw">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left aweq"></a>
			<h1 class="mui-title sferq">梦回鸿蒙_忘记密码</h1>
		</header>
		<div class="mui-content">
			<form id='asqweasd' class="mui-input-group">
				<div class="mui-input-row">
					<label>账号</label>
					<input id="username" type="text" class="mui-input-clear mui-input" placeholder="请输入目标账号">
				</div>
				<div class="mui-input-row">
					<label>昵称</label>
					<input id='name' type="text" class="mui-input-clear mui-input" placeholder="请输入目标昵称">
				</div>
				<div class="mui-input-row">
					<label>班级</label>
					<input id='class1' type="text" class="mui-input-clear mui-input" placeholder="请输入目标班级">
				</div>
			</form>
			<div class="mui-content-padded">
			<button id="login_btn" class="mui-btn mui-btn-block mui-btn-primary">申请找回密码</button>
			</div>
		</div>

		<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/app.js"></script>
		<script type="text/javascript">
			mui.init();
		</script>
		<script type="text/javascript">
			mui.init();
			document.getElementById('login_btn').addEventListener('tap', function() {

				var username = document.getElementById("username").value;
				var name = document.getElementById("name").value;
				var class1 = document.getElementById("class1").value;

				mui.post('http://81.70.23.51:5555/retwordx', {
					"username": username,
					"name": name,
					"class1": class1
				}, function(data) {
					console.log("从服务端返回数据,准备判断");
					mui.toast(data.mag);
					if(data.flag==1)
					{
						mui.openWindow({
							url: "./newpassword.html",
							id: "./newpassword.html",
							extras:{
								username:username,
							},
							createNew: true
						});
					};
				}, 'json');

			});
		</script>
	</body>

</html>
